<?php 
if(!empty($model->title))
$this->breadcrumbs=array(
	'Quản lý Sự kiện'=>array('index'),
	$model->title,
);
if(!empty($model->title))
	echo '<h1><strong>'.$model->title.'<strong></h1><br>';

 ?>
<ul style="float:right;padding-right:5px;margin-top:-60px">
<li class="btn-group">
 <button type="button" class="btn blue dropdown-toggle" data-toggle="dropdown" data-hover="dropdown" data-delay="1000" data-close-others="true">
 <span>Actions</span> <i class="icon-angle-down"></i>
 </button>
 <ul class="dropdown-menu pull-right" role="menu">
    <li><?php echo CHtml::link('Chỉnh sửa',array('default/updateValue','act'=>'doActive','id'=>$model->id),array('class'=>'btn green','style'=>'margin-top: 3px;width: 100%;')); ?></li>
    <li><?php echo CHtml::link('In Activate',array('default/updateValue','act'=>'doInactive','id'=>$model->id),array('class'=>'btn default','style'=>'margin-top: 3px;width: 100%;')); ?></li>
    <li><?php echo CHtml::link('Delete',array('default/updateValue','act'=>'doPendding','id'=>$model->id),array('class'=>'btn red','style'=>'margin-top: 3px;margin-bottom: 3px;width: 100%;')); ?></li>
    <li><?php echo CHtml::link('Update',array('default/update','id'=>$model->id),array('class'=>'btn yellow','style'=>'margin-top: 3px;margin-bottom: 3px;width: 100%;')); ?></li>
    <li><?php echo CHtml::link('Add Slide',array('default/updateValue','act'=>'doSlide','id'=>$model->id),array('class'=>'btn','style'=>'background-color: #852b99;color:#fff;margin-top: 3px;margin-bottom: 3px;width: 100%;')); ?></li>
    <li><?php echo CHtml::link('Top Event',array('default/updateValue','act'=>'doTopEvent','id'=>$model->id),array('class'=>'btn blue','style'=>'margin-top: 3px;width: 100%;')); ?></li>
    <li><?php echo CHtml::link('HomePage',array('default/updateValue','act'=>'doHomePage','id'=>$model->id),array('class'=>'btn blue','style'=>'margin-top: 3px;width: 100%;')); ?></li>
 </ul>
</li>
</ul>
<!-- end button -->

<!-- status event -->
<div class="portlet box green">
<div class="portlet-title">
 <div class="caption"><i class="icon-comments"></i>Thông tin sự kiện</div>
</div>
<div class="portlet-body">
 <table class="table table-bordered table-hover">
    <thead>
       <tr>
          <th>Trạng thái</th>
          <th>Hot</th>
          <th>Slide</th>
          <th>HomePage</th>
          <th>Category</th>
       </tr>
    </thead>
    <tbody>
       <tr class="active">
          <td><?php if($model->status == 'A'){ echo "Hoạt động"; }elseif($model->status == 'B'){ echo "Chờ duyệt"; }elseif($model->status == 'I'){ echo "Ngừng hoạt động"; } ?></td>
          <td><?php if($model->hot == 'Y'){ echo "Có"; }else{ echo "Không"; } ?></td>
          <td><?php if($model->featured == 'Y'){ echo "Có"; }else{ echo "Không"; } ?></td>
          <td><?php if($model->homepage == 'Y'){ echo "Có"; }else{ echo "Không"; } ?></td>
          <td><?php echo $nameCategory; ?></td>
       </tr>
    </tbody>
 </table>
</div>
</div>

 <div class="portlet box green">
  <div class="portlet-title">
     <div class="caption"><i class="icon-coffee"></i>Thông tin đơn vị tổ chức</div>
  </div>
  <div class="portlet-body">
<?php  if(!empty($location->title)){ echo $location->title.'<br>' ; }
 if(!empty($location->location)){ echo $location->location.'<br>' ; } ?>
  </div>
</div>
 <div class="portlet box green">
	<div class="portlet-title">
	 <div class="caption"><i class="icon-cogs"></i>Detail Meta Tag</div>
	</div>
	<div class="portlet-body">
	 <table class="table table-bordered table-hover">
	    <thead>
	       <tr>
	          <th>Title</th>
	          <th>Description</th>
	          <th>Keywords</th>
	          <th>Metarobot</th>
	       </tr>
	    </thead>
	    <tbody>
	       <tr>
	          <td><?php  if(!empty($seo->title)){ echo '<u>Title : </u>'.$seo->title ; } ?></td>
	          <td><?php  if(!empty($seo->description)){ echo '<u>Description : </u>'.$seo->description; } ?></td>
	          <td><?php  if(!empty($seo->keywords)){ echo '<u>Keywords : </u>'.$seo->keywords ; } ?></td>
	          <td><?php  if(!empty($seo->metarobot)){ echo '<u>Metarobot : </u>'.$seo->metarobot ; } ?></td>
	       </tr>
	    </tbody>
	 </table>
	</div>
</div>
 <div class="portlet box green">
  <div class="portlet-title">
     <div class="caption"><i class="icon-picture"></i>Thông tin các loại vé </div>
  </div>
  <div class="portlet-body">
 	 <table class="table table-striped table-bordered table-advance table-hover">
	    <thead>
	       <tr>
	          <th><i class="icon-briefcase"></i> Loại vé</th>
	          <th class="hidden-xs"><i class="icon-user"></i> Số vé</th>
	          <th class="hidden-xs"><i class="icon-user"></i> Số vé còn lại</th>
	          <th><i class="icon-shopping-cart"></i> Giá vé</th>
	       </tr>
	    </thead>
	    <tbody>
	    	<?php foreach ($ticket as $value){ ?>
	       <tr>
	          <td class="highlight">
	             <div class="success"></div>
	             <a href="#"><?php echo $value->title ?></a>
	          </td>
	          <td class="hidden-xs"><?php echo $value->quantity; ?></td>
	          <td class="hidden-xs"><?php echo $value->quantity; ?></td>
	          <td><?php echo $value->price; ?></td>
	       </tr>
	       <?php } ?>
	    </tbody>
	 </table>
  </div>
</div>
<div style="text-align: center;">
	<img src="<?php echo IMAGES_URL . 'events/primary/' . date('Ymd', strtotime($model->posteddate)) . '/' . $model->image; ?>" alt="<?php echo $model->title; ?>" />
</div>
<?php if(!empty($content->description)) echo nl2br($content->description); ?>